// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include "targetver.h"

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers

// Windows Includes

#include <windows.h>
#include <windowsx.h>

#include <crtdbg.h>

// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

#include <mmsystem.h>

#include <algorithm>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <map>
#include <memory>

using std::tr1::shared_ptr;
using std::tr1::weak_ptr;
using std::tr1::static_pointer_cast;
using std::tr1::dynamic_pointer_cast;

#if defined(_DEBUG)
#	define TWF_NEW new(_NORMAL_BLOCK,__FILE__, __LINE__)
#else
#	define TWF_NEW new
#endif

// Have DXUT link the DirectX libs
#define DXUT_AUTOLIB

// DirectX Includes
#include <dxut.h>
#include <d3dx9tex.h>
#include <DXUT.h>
#include <SDKmisc.h>

// TinyXml
#include <tinyxml.h>

#define TWF_ERROR(str)

const float  GCC_PI = 3.14159265358979f;
const float  GCC_2PI = 2 * GCC_PI;

// Local Includes

#include "Debugging\Logger.h"
#include "Math\Point.h"
#include "Math\Rect.h"
#include "Utilities\Templates.h"
#include "Math\Vector3.h"

typedef D3DXCOLOR Color;

extern Color White;
extern Color Black;
extern Color Cyan;
extern Color Red;
extern Color Green;
extern Color Blue;
extern Color Yellow;
extern Color Gray40;
extern Color Gray25;
extern Color Gray65;
extern Color Transparent;

extern Vector3 UpVector;
extern Vector3 RightVector;
extern Vector3 ForwardVector;

// Actor Stuff

class Actor;
class ActorComponent;

typedef unsigned int ActorId;
typedef unsigned int ComponentId;

const ActorId INVALID_ACTOR_ID = 0;
const ComponentId INVALID_COMPONENT_ID = 0;

typedef shared_ptr<Actor> StrongActorPtr;
typedef weak_ptr<Actor> WeakActorPtr;
typedef shared_ptr<ActorComponent> StrongActorComponentPtr;
typedef weak_ptr<ActorComponent> WeakActorComponentPtr;

// Useful #defines

extern const float fOPAQUE;
extern const int iOPAQUE;
extern const float fTRANSPARENT;
extern const int iTRANSPARENT;

extern const int MEGABYTE;
extern const float SIXTY_HERTZ;

extern const int SCREEN_WIDTH;
extern const int SCREEN_HEIGHT;

#include "Application\TestudinApplicationBase.h"

extern INT WINAPI TestudinEntryPoint(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPWSTR    lpCmdLine,
                     int       nCmdShow);